package com.shangyueshang.security;

import lombok.Getter;
import lombok.Setter;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.GrantedAuthority;

import java.util.Collection;
import java.util.List;

/**
 * @author: JokeyZheng
 * @email: zhengjingfeng@ruqimobility.com
 * @created: 2022/1/6 19:53
 * @version: v1.0.0
 */
public class JwtAuthenticationToken extends UsernamePasswordAuthenticationToken {
	
	@Getter
	@Setter
	private String token;
	
	@Getter
	@Setter
	private List<String> authorizedShops;
	
	public JwtAuthenticationToken(Object principal, Object credentials) {
		super(principal, credentials);
	}
	
	public JwtAuthenticationToken(Object principal, Object credentials, Collection<? extends GrantedAuthority> authorities, String token) {
		super(principal, credentials, authorities);
		this.token = token;
	}
	
}
